'use strict'

const Controller = require('egg').Controller
const fs = require('fs')
const path = require('path')

class HomeController extends Controller {
  async index() {
    this.ctx.set('Content-Type', 'text/html')

    this.ctx.body = fs.createReadStream(path.join(__dirname, '../../', 'client', 'index.html'))
  }
}

module.exports = HomeController;
